package com.jbm.jbmsupplier.util;

import java.io.Serializable;
import java.sql.Timestamp;

/**
 * Created by lyh on 2017-03-06.
 */
////@Entity
////@Table(name = "eguard_key", schema = "", catalog = "jbmcore")
////@org.hibernate.annotations.Entity(dynamicUpdate=true,dynamicInsert=true)
public class EguardKeyEntity extends ICtrl implements Serializable {
    private static final long serialVersionUID = -8310054344252952254L;
    private int egkeyId;
    private Integer sourceId;
    private int loginId;
    private int eguardId;
    private Integer openTotal;
    private Integer openCount;
    private Integer onceActime;
    private Integer shareLevel;
    private Timestamp createDate;
    private int createId;
    private Timestamp openDate;
    private Timestamp expireDate;
    private String name;
    private String idCard;
    private String keyType;
    private String cardNom;

    ////@Id
    ////@Column(name = "egkey_id")
    public int getEgkeyId() {
        return egkeyId;
    }

    public void setEgkeyId(int egkeyId) {
        this.egkeyId = egkeyId;
    }

    ////@Basic
    ////@Column(name = "source_id")
    public Integer getSourceId() {
        return sourceId;
    }

    public void setSourceId(Integer sourceId) {
        this.sourceId = sourceId;
    }

    ////@Basic
    ////@Column(name = "login_id")
    public int getLoginId() {
        return loginId;
    }

    public void setLoginId(int loginId) {
        this.loginId = loginId;
    }

    ////@Basic
    ////@Column(name = "eguard_id")
    public int getEguardId() {
        return eguardId;
    }

    public void setEguardId(int eguardId) {
        this.eguardId = eguardId;
    }

    ////@Basic
    ////@Column(name = "open_total")
    public Integer getOpenTotal() {
        return openTotal;
    }

    public void setOpenTotal(Integer openTotal) {
        this.openTotal = openTotal;
    }

    ////@Basic
    ////@Column(name = "open_count")
    public Integer getOpenCount() {
        return openCount;
    }

    public void setOpenCount(Integer openCount) {
        this.openCount = openCount;
    }

    ////@Basic
    ////@Column(name = "once_actime")
    public Integer getOnceActime() {
        return onceActime;
    }

    public void setOnceActime(Integer onceActime) {
        this.onceActime = onceActime;
    }

    ////@Basic
    ////@Column(name = "share_level")
    public Integer getShareLevel() {
        return shareLevel;
    }

    public void setShareLevel(Integer shareLevel) {
        this.shareLevel = shareLevel;
    }

    ////@Basic
    ////@Column(name = "create_date")
    public Timestamp getCreateDate() {
        return createDate;
    }

    public void setCreateDate(Timestamp createDate) {
        this.createDate = createDate;
    }

    ////@Basic
    ////@Column(name = "create_id")
    public int getCreateId() {
        return createId;
    }

    public void setCreateId(int createId) {
        this.createId = createId;
    }

    ////@Basic
    ////@Column(name = "open_date")
    public Timestamp getOpenDate() {
        return openDate;
    }

    public void setOpenDate(Timestamp openDate) {
        this.openDate = openDate;
    }

    ////@Basic
    ////@Column(name = "expire_date")
    public Timestamp getExpireDate() {
        return expireDate;
    }

    public void setExpireDate(Timestamp expireDate) {
        this.expireDate = expireDate;
    }

    ////@Basic
    ////@Column(name = "name")
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    ////@Basic
    ////@Column(name = "id_card")
    public String getIdCard() {
        return idCard;
    }

    public void setIdCard(String idCard) {
        this.idCard = idCard;
    }

    ////@Basic
    ////@Column(name = "key_type")
    public String getKeyType() {
        return keyType;
    }

    public void setKeyType(String keyType) {
        this.keyType = keyType;
    }

    ////@Basic
    ////@Column(name = "card_nom")
    public String getCardNom() {
        return cardNom;
    }

    public void setCardNom(String cardNom) {
        this.cardNom = cardNom;
    }

    ////@Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        EguardKeyEntity that = (EguardKeyEntity) o;

        if (createId != that.createId) return false;
        if (egkeyId != that.egkeyId) return false;
        if (eguardId != that.eguardId) return false;
        if (loginId != that.loginId) return false;
        if (cardNom != null ? !cardNom.equals(that.cardNom) : that.cardNom != null) return false;
        if (createDate != null ? !createDate.equals(that.createDate) : that.createDate != null) return false;
        if (expireDate != null ? !expireDate.equals(that.expireDate) : that.expireDate != null) return false;
        if (idCard != null ? !idCard.equals(that.idCard) : that.idCard != null) return false;
        if (keyType != null ? !keyType.equals(that.keyType) : that.keyType != null) return false;
        if (name != null ? !name.equals(that.name) : that.name != null) return false;
        if (onceActime != null ? !onceActime.equals(that.onceActime) : that.onceActime != null) return false;
        if (openCount != null ? !openCount.equals(that.openCount) : that.openCount != null) return false;
        if (openDate != null ? !openDate.equals(that.openDate) : that.openDate != null) return false;
        if (openTotal != null ? !openTotal.equals(that.openTotal) : that.openTotal != null) return false;
        if (shareLevel != null ? !shareLevel.equals(that.shareLevel) : that.shareLevel != null) return false;
        if (sourceId != null ? !sourceId.equals(that.sourceId) : that.sourceId != null) return false;

        return true;
    }

    ////@Override
    public int hashCode() {
        int result = egkeyId;
        result = 31 * result + (sourceId != null ? sourceId.hashCode() : 0);
        result = 31 * result + loginId;
        result = 31 * result + eguardId;
        result = 31 * result + (openTotal != null ? openTotal.hashCode() : 0);
        result = 31 * result + (openCount != null ? openCount.hashCode() : 0);
        result = 31 * result + (onceActime != null ? onceActime.hashCode() : 0);
        result = 31 * result + (shareLevel != null ? shareLevel.hashCode() : 0);
        result = 31 * result + (createDate != null ? createDate.hashCode() : 0);
        result = 31 * result + createId;
        result = 31 * result + (openDate != null ? openDate.hashCode() : 0);
        result = 31 * result + (expireDate != null ? expireDate.hashCode() : 0);
        result = 31 * result + (name != null ? name.hashCode() : 0);
        result = 31 * result + (idCard != null ? idCard.hashCode() : 0);
        result = 31 * result + (keyType != null ? keyType.hashCode() : 0);
        result = 31 * result + (cardNom != null ? cardNom.hashCode() : 0);
        return result;
    }
}
